import request from '../utils/request'
const api_name = "/member"

export default {
    // 发送验证码
    sendSMS(mobile) {
        return request({
            url: `${api_name}/sendsms/${mobile}`,
            method: "get",
        })
    },
    // 注册用户
    register(user) {
        return request({
            url: `${api_name}/register`,
            method: "post",
            data: user
        })
    },
    // 登录
    login(user) {
        return request({
            url: `${api_name}/login`,
            method: "post",
            data: user
        })
    },
    // 获取登录用户信息
    getInfo() {
        return request({
            url: `${api_name}/getinfo`,
            method: "get",
        })
    }
}